from flask import jsonify

def success_response(data=None, message="success", code=200):
    return jsonify({
        "code": code,
        "message": message,
        "data": data
    })

def error_response(message="error", code=400):
    return jsonify({
        "code": code,
        "message": message,
        "data": None
    }), code 